package project7.Storage;

import java.util.ArrayList;

/**
 *
 * @author Michael Tracy
 */
public interface StorageInterface {

    /**
     *
     * @param serverCode
     * @param arr
     * @param tableNumber
     * @param total
     * @return
     */
    boolean addCheck(int serverCode, ArrayList<MenuItem> arr, int tableNumber, double total);

    /**
     *
     * @param checkNumber
     * @param item
     * @param count
     * @return
     */
    boolean addItemOrder(int checkNumber, MenuItem item, int count);

    /**
     *
     * @param checkNumber
     * @param arr
     * @return
     */
    boolean addOrderArray(int checkNumber, ArrayList<MenuItem> arr);

    /**
     *
     * @param serverCode
     * @param checkNumber
     * @param tableNumber
     * @return
     */
    boolean addTable(int serverCode, int checkNumber, int tableNumber);

    /**
     *
     * @param number
     * @return
     */
    Check getCheck(int number);

    /**
     *
     * @param checkNumber
     * @return
     */
    ArrayList<MenuItem> getItemsPerCheck(int checkNumber);

    /**
     *
     * @param itemName
     * @return
     */
    MenuItem getMenuItem(String itemName);

    /**
     *
     * @return
     */
    ArrayList<MenuItem> getMenuItems();

    /**
     * This will retrieve a server from the database according to the id given.
     * @param id int of the server to find.
     * @return Server reference if server is found, null otherwise
     */
    Server getServer(int id);

    /**
     *
     * This returns a Table in the database given by number; if the Table is not in the database, this returns null.
     * @param number int of the table to get
     * @return Table reference of the table, null of it is not found.
     */
    Table getTable(int number);

    /**
     *
     * @param checkNumber
     * @param itemName
     * @param count
     * @return
     */
    boolean removeOrderItem(int checkNumber, String itemName, int count);

}
